<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
        <h1>
            人员管理
            <small>未审核</small>
        </h1>
        <ol class="breadcrumb">
            <li><a href="/dashboard"><i class="fa fa-dashboard"></i> Home</a></li>
            <li class="active">人员管理</li>
        </ol>
    </section>

    <!-- Main content -->
    <section class="content">
        <div class="row">
            <div class="col-xs-12">
                <div class="box">
                    <div class="box-header">
                        <h3 class="box-title"><?php if (isset($search) &&$search != "") echo "与「" . $search . "」相关 " ?>
                            共 <?php echo count($users) ?> 人</h3>

                        <div class="box-tools">
                            <div class="input-group input-group-sm" style="width: 150px;">
                                <input type="text" name="table_search" class="form-control pull-right" placeholder="搜索">

                                <div class="input-group-btn">
                                    <button type="submit" class="btn btn-default" id="btn_user_search"><i
                                            class="fa fa-search"></i></button>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!-- /.box-header -->
                    <div class="box-body table-responsive no-padding">
                        <table class="table table-hover">
                            <tr>
                                <th>姓名</th>
                                <th>单位</th>
                                <th>身份证号</th>
                                <th>电话号码</th>
                                <th>操作</th>
                            </tr>

                            <?php foreach ($users as $user): ?>
                                <tr>
                                    <td><?php echo $user["name"] ?></td>
                                    <td><?php echo $user["department"] ?></td>
                                    <td><?php echo $user["idcard"] ?></td>
                                    <td><?php echo $user["phone"] ?></td>
                                    <td>
                                        <button
                                            class="btn  btn-xs <?php echo $user["checked"] ? "btn-danger btn-user-uncheck" : "btn-primary btn-user-check" ?>"
                                            data-id="<?php echo $user["openid"] ?>"><?php echo $user["checked"] ? "取消授权" : "通过授权" ?></button>
                                    </td>
                                </tr>
                            <?php endforeach; ?>

                        </table>
                    </div>
                    <!-- /.box-body -->
                </div>
                <!-- /.box -->
            </div>
        </div>
    </section>
    <!-- /.content -->
</div>
<!-- /.content-wrapper -->